﻿#include "deleteuser.h"
#include "ui_deleteuser.h"
#include <QPainter>
DeleteUser::DeleteUser(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::DeleteUser)
{
    ui->setupUi(this);
    this->setWindowFlags(Qt::Dialog|Qt::FramelessWindowHint);
    setAttribute(Qt::WA_TranslucentBackground,true);    //设置透明
}

DeleteUser::~DeleteUser()
{
    delete ui;
}

void DeleteUser::on_confirm_pushButton_clicked()
{
    m_isdeleted = true;
    this->close();
}

void DeleteUser::on_cancel_pushButton_clicked()
{
    m_isdeleted = false;
    this->close();
}

 void DeleteUser::paintEvent(QPaintEvent *event)
 {

     Q_UNUSED(event)
     QPainter painter(this);
     painter.fillRect(rect(),QColor(0,0,0,100));
 }
 bool DeleteUser::isDeletedUser()
 {
     return m_isdeleted;
 }
 void DeleteUser::changeEvent(QEvent* event)
 {
     switch (event->type())
     {
     case QEvent::LanguageChange:
         ui->retranslateUi(this);
         break;
     default:
         QWidget::changeEvent(event);
         break;
     }
 }
